<?php
# get current page id
$page_id = c_get_page();

# file that will combine final html file for selected page
echo i_header(); // header of page

# show sidebar for all pages except login and registration
if( $page_id != I_MAIN_PAGE && $page_id != I_REGISTRATION_PAGE){
	echo i_sidebar();
}
switch ($page_id){ // based on what page is requested, show it.
		
	case I_MAIN_PAGE:
		echo i_main_page(); 	// login page
		break;
		
	case I_REGISTRATION_PAGE:
		echo i_register(); 		// registration page
		break;
		
	case I_HOME_PAGE: 			// home page
		echo i_home();
		break;
	
	case I_SEARCH_GROUP:
		echo i_search_group();
		break;
	
	case I_GROUP_RESULTS:
		echo i_group_results();
		break;
	
	case I_GROUP_OVERVIEW:
		echo i_group_overview();
		break;
		
	case I_CREATE_MEETING:
		echo i_create_meeting();
		break;
		
	case I_CREATE_GROUP:
		echo i_create_group();
		break;
	
	case I_MEETING_SUGGESTION:
		echo i_meeting_suggestion();
		break;
	
	case I_SUGGEST_TIME_FOR_MEETING:
		echo i_suggest_time_for_meeting();
		break;
	
	case I_EDIT_GROUP:
		echo i_edit_group();
		break;
	
	case I_PARTICIPATED_MEETINGS:
		echo i_participated_meetings();
		break;
		
	case I_EDITABLE_GROUPS:
		echo i_editable_groups();
		break;
	
	case I_SET_TIMELINE:
		echo i_set_timeline();
		break;
}
echo i_footer(); // footer of page
?>